#pragma once


// CStaticEx
#define STATICEX_CLASSNAME    _T("MFCSTATICEXCTRL")  // Window class name
#define STATICEX_ID           1002

class CStaticEx : public CStatic
{
	DECLARE_DYNAMIC(CStaticEx)
public:
	CStaticEx(COLORREF crBackgnd, COLORREF crText);
	virtual ~CStaticEx();

	void SetBackColor(COLORREF crBackgnd);
	void SetTextColor(COLORREF crText);
	BOOL Create(CWnd* pParentWnd, const RECT& rect, UINT nID = STATICEX_ID, DWORD dwStyle = WS_CHILD|WS_VISIBLE|SS_CENTER);

private:
	COLORREF m_crBackgnd;
	COLORREF m_crText;
	CBrush   m_brBackGnd;
protected:
	DECLARE_MESSAGE_MAP()
	afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
};


